#include <stdio.h>

#include "graph.h"
#include <string.h>

bool visited[MAX_CITY_COUNT];
int DFS_traverse(int v)
{
	printf("%d %s", v, GRAPH.cities[v].name);
	visited[v] = true;
	for (GraphArc* p = GRAPH.cities[v].first_arc; p; p = p->next)
		if (!visited[p->to])
			DFS_traverse(p->to);
	return 0;
}
int DFS(int v)
{
	memset(visited, false, sizeof(visited));
	DFS_traverse(v);
	return 0;
}
